﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Cherry.Agile.RpcService.Client
{
    /// <summary>
    /// 请求服务代理接口
    /// </summary>
    public interface IServiceProxy : IDisposable
    {
        /// <summary>
        /// 网络路径
        /// </summary>
        string Url { get; set; }

        /// <summary>
        /// 统一处理接口
        /// </summary>
        /// <param name="requestBuffer">请求数据（含序列化之后的所有请求单元）</param>
        /// <param name="responseCallback">回调函数</param>
        /// <param name="exceptionHandle">通信异常处理</param>
        void Process(byte[] requestBuffer, Action<byte[]> responseCallback, Action<Exception> exceptionHandle);
    }
}
